package com.medmarkmobile.gui;

import com.example.medmarkmobile.R;
import com.medmarkmobile.connection.ConnectToServer;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class ClienteAndroid extends Activity{
	
	Button btnConectar;
	EditText edIp, edPorta;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		
		
		

		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_connection);
		
		btnConectar = (Button) findViewById(R.id.btnConectar);
		
		edIp = (EditText) findViewById(R.id.edIp);
		edPorta = (EditText) findViewById(R.id.edPorta);
		
		System.out.println(edIp);
		System.out.println(edPorta);
		
		btnConectar.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				String[] params = {edIp.getText().toString(), edPorta.getText().toString()};
	        	
	        	new ConnectToServer(ClienteAndroid.this).execute(params);
				
			}
		});
	}

}
